package model;

import java.util.*;

public class MetaDeckModel {
	final private GameModel game;
	final private ChatModel chat;
	final private Map<String, Position> playerPositions;
	
	public MetaDeckModel() {
		game = new GameModel();
		chat = new ChatModel();
		playerPositions = new HashMap<String, Position> ();
	}
	
	public void changePosition(String playerName, Position pos) {
		playerPositions.put(playerName, pos);
		game.getPlayer(pos).setName(playerName);
	}
	public GameModel getGame() {
		return game;
	}
	public ChatModel getChat() {
		return chat;
	}
	public Position getPosition(String name) {
		return playerPositions.get(name);
	}
	public boolean isLoggedIn(String name) {
		return playerPositions.keySet().contains(name);
	}
}
